package com.dhr.sarcosuchus.daobase.util;

import com.alibaba.druid.filter.config.ConfigTools;

/**
 * Created by panzhuowen on 2016/12/4 18:11 18.
 * Generator password for database.
 */
public class PasswordGenerator {

    public static void main(String[] args) throws Exception {
        String password = "root";
        String[] arr = ConfigTools.genKeyPair(512);
        System.out.println("privateKey:" + arr[0]);
        System.out.println("publicKey:" + arr[1]);
        System.out.println("password:" + ConfigTools.encrypt(arr[0], password));
    }

}
